package com.example.jsonhelper.framework

import android.app.Activity

/**
 *
 * @author Yingyong Lao
 * 创建时间 2022/8/17 23:05
 * @version 1.0
 */
object LyyActivityCollector {
    private val list= ArrayList<Activity>()

    fun addAct(activity: Activity){
        list.add(activity)
    }

    fun removeAct(activity: Activity){
        list.remove(activity)
    }

    fun exitApp(){
        list.forEach {
            if (!it.isFinishing){
                it.finish()
            }
        }
    }
}